package com.student.util;


import com.github.pagehelper.PageInfo;
import com.student.VO.PageInfoResult;

/**
 * @BelongsProject: ecard_admin
 * @BelongsPackage: com.cykj.util
 * @Author: 小徐
 * @CreateTime: 2024-10-29 15:11
 * @Description: TODO
 * @Version: 1.0
 */
public class PageResultUtils {

    private PageResultUtils(){

    }

    public static PageInfoResult getResult(PageInfo<?> pageInfo){
        PageInfoResult pageInfoResult = new PageInfoResult();
        pageInfoResult.setPageNum(pageInfo.getPageNum());
        pageInfoResult.setPages(pageInfo.getPages());
        pageInfoResult.setTotal(pageInfo.getTotal());
        pageInfoResult.setList(pageInfo.getList());

        return pageInfoResult;
    }
}